var assert = require('assert');
var should = require('should');
var _ = require('lodash');
var activityModel = require('../../app/models/activityModel');
var config = require('../config');

suite('activityModel', function () {
    var activity_model;
    setup(function (done) {
        activityModel.getByRoleId(config.role_id, function (err, model) {
            assert.equal(err == null, true);
            activity_model = model;
            activity_model.toJSON();
            done();
        });
    });

    suite('activity', function () {
        test('获取开服活动', function (done) {
            activityModel.getByRoleId(config.other_role_id, function (err, model) {
                model.addOpenServerReceivedDays(1);
                model.openServerRewardIsCanReceive(1);
                model.levelRewardIsCanReceive(1);
                model.addContinuouslyLoginDays();
                model.push();
                assert.equal(err == null, true);
                done();
            });
        });
    });
});
